//
//  UIScrollView+extension.m
//  lcf-newproject
//
//  Created by yangyang on 14-11-27.
//  Copyright (c) 2014年 yang. All rights reserved.
//

#import "UIScrollView+extension.h"

@implementation UIScrollView (extension)

+(void)setScrollAreaWithScrollView:(UIScrollView *)scrollView withFrontLocation:(CGFloat)frontLocation withBottomLocation:(CGFloat)bottomLocation{
    //控制scrollView的上滑下拉偏移量
    if (scrollView.contentOffset.y <=bottomLocation) {
        scrollView.contentOffset = CGPointMake(0, bottomLocation);
    }else if (scrollView.contentOffset.y >=frontLocation){
        scrollView.contentOffset = CGPointMake(0, frontLocation);
    }
}
@end
